package koction.rankController;


import java.util.List;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


import koction.model.rank.RankVO;
import koction.model.rankService.RankService;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;



@Controller
public class RankController 
{
	@Resource(name="rankServiceImpl")
	private RankService rankService;
	
	
	public void insertKeyword(HttpServletRequest request, HttpServletResponse response, String keyword) throws Exception
	{
		rankService.insertKeyword(keyword);
	}
	@RequestMapping("/searchword.do")
	public ModelAndView getAllKeywordList(HttpServletRequest request, HttpServletResponse response) throws Exception
	{
		List<RankVO> list = rankService.getAllKeywordList();
		ModelAndView mv=new ModelAndView("rankresult.admin", "list", list);
		return mv;
	}
}
